; Disassembly of the file "D:\Elettronica\Z80\dZ80\monitor5.obj" ; ; CPU Type: Z80 ; ; Created with dZ80 2.0 ; ; on Thursday, 29 of June 2006 at 06:41 PM ; ; ; monitor esadecimale originale con SP rilocato in ram prima di EC00 ; NOTA: rispetto all'originale gli interrupt sono disabilitati .org 08000h l8000: jp l81ab l8003: push hl push bc ld hl,0001h ld c,02h jr l8017 l800c: push hl push bc ld hl,0006h ld c,04h jr l8017 l8015: push hl push bc l8017: dec c l8018: dec l ld b,(hl) inc l ld (hl),b dec l dec c jr nz,l8018 ld (hl),a pop bc pop hl ret l8024: push hl ld hl,0001h jr l802b l802a: push hl l802b: ld a,(hl) rlca rlca rlca rlca dec l or (hl) pop hl ret l8034: push af push hl push bc ld hl,0001h jr l803f l803c: push af push hl push bc l803f: ld c,02h push af and 0f0h rrca rrca rrca rrca call l8015 pop af and 0fh call l8015 pop bc pop hl pop af ret l8055: push af push hl ld hl,0004h call l802a ld e,a inc l inc l call l802a ld d,a pop hl pop af ret ld a,11h l8069: push hl push bc ld hl,0008h ld c,08h l8070: dec l dec c ld (hl),a jr nz,l8070 pop bc pop hl ret l8078: push af push hl push bc ld hl,0006h ld a,d ld c,02h call l803c dec l dec l ld a,e call l803c pop bc pop hl pop af ret push hl ld hl,(0020h) jr l8095 l8094: push hl l8095: push af l8096: call l80d6 dec hl ld a,h or l jr nz,l8096 pop af pop hl ret l80a1: call l80ec call l80aa cp 10h ret l80aa: push bc push hl l80ac: ld hl,0456h l80af: in a,(0f0h) bit 7,a jr z,l80ac dec hl ld a,h or l jr nz,l80af l80ba: in a,(0f0h) bit 7,a jr nz,l80ba ld b,a ld hl,0005h call l8094 l80c7: in a,(0f0h) ld c,a and 7fh cp b jr nz,l80c7 bit 7,c jr nz,l80ac pop hl pop bc ret l80d6: push af push de ld de,0047h l80db: dec de ld a,d or e jr nz,l80db pop de pop af ret l80e3: push hl ld hl,1388h call l8094 pop hl ret l80ec: push bc push de push hl push af ld bc,00f7h ld de,0007h l80f6: ld hl,8187h ld a,(de) add a,l ld l,a ld a,(hl) out (c),a dec e dec c ld a,c cp 0efh jr nz,l80f6 pop af pop hl pop de pop bc ret l810b: inc sp inc sp cp 10h jr c,l8139 cp 11h jp z,l81d4 cp 12h jp z,l8216 cp 14h jp z,l8296 cp 13h jp z,l82fb ;----------------------------------- cp 17h jp z,l8400 ;----------------------------------- cp 15h jp z,l830a cp 16h jp z,l835f cp 1fh jp z,l83bd l8139: dec sp dec sp ret l813c: ex de,hl call l8078 call l80ec ex de,hl ret l8145: push de ld de,0ad7h l8149: in a,(0efh) bit 3,a jr nz,l815c dec de ld a,d or e jr nz,l8149 ld a,08h pop de inc sp inc sp jp l8338 l815c: ld a,c out (0eeh),a pop de ret l8161: in a,(0efh) bit 4,a jr z,l8161 and 07h jr z,l8170 inc sp inc sp jp l8338 l8170: ld a,d out (0efh),a in a,(0eeh) ret l8176: .byte 0dfh, 0a4h ; caratteri A,F,B,C,D,E,L,H,1,S,P,1,P,C,00 l8178: .byte 00ah ;carattere 0A "A" .byte 00fh ;carattere 0F "F" .byte 00bh ;carattere 0B "b" .byte 00ch ;carattere 0C "C" .byte 00dh ;carattere 0d "d" .byte 00eh ;carattere 0E "E" .byte 016h ;carattere 16 "L" .byte 015h ;carattere 15 "H" .byte 001h ;carattere 1 "1" .byte 005h ;carattere 5 "S" .byte 017h ;carattere 17 "P" .byte 001h ;carattere 1 "1" .byte 017h ;carattere 17 "P" .byte 00ch ;carattere 0C "C" .byte 000h ;non è un carattere ma il terminatore di questa tabella ;l8178: .byte 00ah, 00fh, 00bh, 00ch, 00dh, 00eh, 016h, 015h, 001h, 005h, 017h ; .byte 001h, 017h, 00ch, 000h ; Tabella caratteri display ; Valori per l'accensione dei segmenti del display: ; ; 1 ; - bit a 1 spegne il segmento ; 32 | | 2 ; - 64 F0 = display a destra ; 16 | | 4 !! ; - F7 = display a sinistra ; 8 ; 128 = punto decimale ; l8187: .byte 0c0h ;carattere 0 "0" .byte 0f9h ;carattere 1 "1" .byte 0a4h ;carattere 2 "2" .byte 0b0h ;carattere 3 "3" .byte 099h ;carattere 4 "4" .byte 092h ;carattere 5 "5" o "S" .byte 082h ;carattere 6 "6" .byte 0f8h ;carattere 7 "7" .byte 080h ;carattere 8 "8" .byte 090h ;carattere 9 "9" .byte 088h ;carattere 0A "A" .byte 083h ;carattere 0B "b" .byte 0c6h ;carattere 0C "C" .byte 0a1h ;carattere 0d "d" .byte 086h ;carattere 0E "E" .byte 08eh ;carattere 0F "F" .byte 0bfh ;carattere 10 "-" .byte 0ffh ;carattere 11 " " blank .byte 0abh ;carattere 12 "n" bassa .byte 09dh ;carattere 13 "u" alta .byte 0b6h ;carattere 14 "3" linee orizzontali" .byte 089h ;carattere 15 "H" .byte 0c7h ;carattere 16 "L" .byte 08ch ;carattere 17 "P" .byte 0a7h ;carattere 18 "c" bassa .byte 0c2h ;carattere 19 "G" .byte 0c8h ;carattere 1A "N" .byte 098h ;carattere 1B "q" .byte 0afh ;carattere 1C "r" .byte 087h ;carattere 1D "t" .byte 0c1h ;carattere 1E "U" .byte 0e3h ;carattere 1F "u" bassa .byte 0e1h ;carattere 20 "J" .byte 091h ;carattere 21 "Y" .byte 0ffh ;carattere 22 " " blank .byte 0ffh ;carattere 23 " " blank ;l8187: .byte 0c0h, 0f9h, 0a4h, 0b0h, 099h, 092h, 082h, 0f8h, 080h, 090h, 088h, 083h, 0c6h ; .byte 0a1h, 086h, 08eh, 0bfh, 0ffh, 0abh, 09dh, 0b6h, 089h, 0c7h, 08ch, 0a7h, 0c2h ; .byte 0c8h, 098h, 0afh, 087h, 0c1h, 0e3h, 0e1h, 091h, 0ffh, 0ffh l81ab: ld hl,0000h ld (0022h),hl ;---------------------------------------- ROUTINE NUOVA ld h,0ebh ; cerca la locazione iniziale per lo SP prima di EC00 l81b3: ld a,(hl) cpl ld (hl),a cp (hl) jr z,l81bc dec h jr l81b3 l81bc: ld sp,hl ;---------------------------------------- ROUTINE ORIGINALE ; dec l ;l81b2: dec h ; ld a,(hl) ; cpl ; ld (hl),a ; cp (hl) ; jr nz,l81b2 ; (-7) ; cpl ; ld (hl),a ; inc hl ; ld sp,hl ;----------------------------------------- ld hl,0066h ld (0010h),hl ld a,0c3h ld (0038h),a ld (0066h),a ld hl,82b9h ld (0039h),hl ld (0067h),hl l81d4: ld a,10h call l8069 ld hl,0007h ld (hl),12h l81de: call l80ec call l80aa call l810b cp 10h jr z,l81f0 call l800c jr l81de l81f0: call l8055 ld a,(de) call l8034 l81f7: call l80ec call l80aa call l810b cp 10h jr z,l8209 call l8003 jr l81f7 l8209: call l8055 call l8024 ld (de),a inc de call l8078 jr l81f0 l8216: ld a,10h call l8069 ld hl,0007h ld (hl),13h ld bc,0008h ld hl,8178h l8226: ld a,(hl) or a jr z,l8216 dec a jr z,l824a call l828d l8230: call l80ec call l80aa call l810b cp 10h jr z,l8242 call l8003 jr l8230 l8242: call l8024 ld (bc),a l8246: inc hl inc bc jr l8226 l824a: inc hl call l828d inc hl inc bc ld a,(hl) ld (0005h),a ld a,(bc) push hl push bc ld hl,0003h ld c,02h call l803c pop bc pop hl l8261: call l80ec call l80aa call l810b cp 10h jr z,l827c push hl push bc ld hl,0003h ld c,04h call l8015 pop bc pop hl jr l8261 l827c: call l8024 dec bc ld (bc),a push hl ld hl,0003h call l802a pop hl inc bc ld (bc),a jr l8246 l828d: ld a,(hl) ld (0006h),a ld a,(bc) call l8034 ret l8296: ld hl,(0010h) ld sp,hl ld hl,(0012h) push hl call l82a3 ;-------------------------------------------------------------- ; modifica per avere gli interrupt disabilitati di ; ei ;-------------------------------------------------------------- ret l82a3: ld hl,0008h ld a,03h l82a8: ld d,(hl) inc hl ld e,(hl) inc hl push de dec a jr nz,l82a8 ld e,(hl) inc hl ld d,(hl) push de pop hl pop de pop bc pop af ret ld (000eh),hl ld (0008h),a push af pop hl ld (0009h),hl ld hl,000ah ld (hl),b inc l ld (hl),c inc l ld (hl),d inc l ld (hl),e pop hl ld (0012h),hl ld hl,0000h add hl,sp ld (0010h),hl ld a,10h call l8069 ld hl,0007h ld (hl),14h ld hl,(0012h) ex de,hl call l8078 ld a,(de) call l8034 l82ee: call l80ec call l80aa call l810b cp 10h jr nz,l82ee l82fb: ld hl,(0010h) ld sp,hl ld hl,(0012h) push hl call l82a3 out (0f8h),a retn l830a: ld c,14h ld b,05h call l838d call l80e3 call l80e3 ld hl,(0022h) ld de,0000h ld (0022h),de ld c,h call l8145 ld c,l call l8145 l8329: bit 2,d jr nz,l834f ld c,(hl) call l8145 call l813c inc hl inc de jr l8329 l8338: push af push hl ld a,10h call l8069 ld hl,0007h ld (hl),0eh pop de call l8078 pop af ld (0000h),a call l80ec l834f: call l80e3 ld a,18h out (0efh),a call l80aa xor a out (0efh),a jp l8000 l835f: ld c,10h ld b,16h call l838d call l80e3 out (0efh),a call l8161 ld b,a call l8161 ld c,a ld hl,(0022h) add hl,bc ld bc,0000h ld (0022h),bc l837e: bit 2,b jr nz,l834f call l8161 ld (hl),a call l813c inc bc inc hl jr l837e l838d: ld a,18h out (0efh),a ld a,10h call l8069 ld hl,0007h ld (hl),18h ld hl,0001h ld (hl),b call l80ec dec hl ld (hl),0bh ld d,09h call l80aa cp 0bh jr z,l83b2 ld (hl),0ah ld d,11h l83b2: ld a,c jr nz,l83b7 sub 08h l83b7: out (0efh),a call l80ec ret l83bd: ld hl,0004h ld de,0033h xor a call l8069 l83c7: call l80a1 jr nz,l83ce ld a,r l83ce: and 0fh inc e dec l ld (de),a ld (hl),11h jr nz,l83c7 l83d7: ld hl,0007h ld c,04h l83dc: call l80a1 jr z,l83e6 call l8015 jr l83dc l83e6: ld hl,0003h ld de,0033h ld b,05h ld c,00h l83f0: ld a,c ld (0000h),a dec b jr z,l83d7 inc hl inc de ld a,(de) cp (hl) jr nz,l83f0 inc c jr l83f0 ;---------------------------------------------------------- .org 08400h l8400: .end